<!DOCTYPE html>
<html lang="zh-CN">

<head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
                /* 若行内元素有了浮动，则不需要再转换成块级 */
                span,
                div {
                        float: left;
                        width: 100px;
                        height: 100px;
                        background-color: #1533dd;
                }
        </style>
</head>

<body>
        <span>1 </span>
        <span>2</span>
        <div>3</div>
</body>

</html>